class Bookmark < ActiveRecord::Base
  acts_as_taggable

  belongs_to :source
  belongs_to :user
  # The caching column defaults to cached_tag_list, but can be changed:
  #
  # set_cached_tag_list_column_name "cached_tag_list"
  PER_PAGE = 20

  def url
    source.uri
  end

  def url=(val)
#    src = Source.find(source_id)
#    if src.nil || src.uri != val
#      src = Source.new(:uri=>val)
#      src.save
#      this.source_id = src.id
#    else
#      source.uri = val
#      source.save
#    end

  end
end
